package com.jh.user.repository;

import com.jh.user.pojo.City;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @author zhugu
 * @version 1.0
 * 2018/12/6 10:44
 */
@Repository
public interface CityRepository extends JpaRepository<City, Long>, JpaSpecificationExecutor<City> {
    @Query("select c from City c where c.city like :city%")
    City queryByCity(@Param("city") String city);
}
